package com.kcyu.sfherp.entity;


import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.sql.Timestamp;
import java.util.List;

@Data
@TableName("orchzd")
public class OrderZd {

    @TableId
    @ExcelIgnore
    private Integer id;
    @ExcelProperty("单号")
    private String dh;
    @ExcelProperty("客户编号")
    private String khbh;
    @ExcelProperty("客户名称")
    private String khname;
    @ExcelProperty("金额")
    private Float je;
    @ExcelIgnore
    private Float yf;

    @TableField(exist = false)
    @ExcelIgnore
    private Float ml;
    @ExcelIgnore
    private String fkfs;

    @TableField(exist = false)
    @ExcelIgnore
    private List<OrderDetail> detail;

    @TableField(exist = false)
    @ExcelIgnore
    private List<OrderMx> chmxList;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty("日期")
    @ColumnWidth(17)
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.RIGHT)
    private Timestamp rq;
}
